import request2 from "../axios2";

const importExcle = (data) => {
    return request2({
        url: '/energy/importExcel',
        method: 'post',
        data
    })
}
const exportExcle = (params) =>{
    return request2({
        url:'/energy/exportExcel',
        method:'get',
        params
    })
}
/**
 * 逻辑删除
 * @param {id} 
 */
const logicDelete = (id) => {
    return request2({
        url: '/energy/logicDelete/'+id,
        method: 'post',
        id
    })
}
/**
 * 
 * @param {ids[]} 
 * 
 */
const logicDeleteBatch =(ids)=>{
    return request2({
        url: '/energy/logicDeleteBatch/'+ids,
        method: 'post',
        ids
    })
}

//获取能单位能源资源计量采集数据
const get = (params) => {
    return request2({
        url: '/energy/pageList',
        method: 'get',
        params
    })
}

//获取近一个月上报数据量
const getReportList=()=>{
    return request2({
        url:'/energy/getReportList',
        method:'get'
    })
}

//获取近一个月上报数据量
const getUnReportList=()=>{
    return request2({
        url:'/energy/getUnReportList',
        method:'get'
    })
}


export {
    importExcle,
    exportExcle,
    logicDelete,
    logicDeleteBatch,
    get,
    getUnReportList,
    getReportList
}